package com.personnel_management.service.impl;

import com.personnel_management.dao.PositionDao;
import com.personnel_management.pojo.Position;
import com.personnel_management.pojo.Staff;
import com.personnel_management.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PositionServiceImpl implements PositionService {
    @Autowired
    private PositionDao dao;
    @Override
    public Integer addPosition(Position position) {
        return dao.addPosition(position);
    }

    @Override
    public Integer deletePosition(Integer id) {
        return dao.deletePosition(id);
    }

    @Override
    public Integer setPosition(Position position) {
        return dao.setPosition(position);
    }

    @Override
    public List<Position> selectAll() {
        return dao.selectAll();
    }

    @Override
    public List<Position> selectByName(String name) {
        return dao.selectByName(name);
    }

    @Override
    public List<Position> selectByWages(Double min, Double max) {
        return dao.selectByWages(min,max);
    }

    @Override
    public List<Staff> selectStaffs(Integer id) {
        return dao.selectStaffs(id);
    }
}
